package Demo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 34255
 * Date: 2024-05-15
 * Time: 20:59
 */
public class Dog extends Animal {

    public Dog(String name, int age, String gender) {
        super(name, age, gender);
        System.out.println("Dog.构造方法执行中......");
    }

    public void wangWang(){
        System.out.println(name + " 正在汪汪叫!");
    }
    public Dog(){

    }

    static{
        System.out.println("Dog.静态代码块执行中......");
    }

    {
        System.out.println("Dog.实例代码块执行中......");
    }

    @Override
    public String toString() {
        return "Dog{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", gender='" + gender + '\'' +
                '}';
    }
}
